/*
 * CS_SOCIAL_REQ_INGAME_FRIEND_SM.cpp
 *
 *  Created on: 2013. 6. 4.
 *      Author: the2
 */


#include "../../Command.h"
#include "../../User.h"
#include "../../Proxy.h"
#include "../../../../protocol/iFriends.h"

namespace ProjectZ { namespace NCommand {

void Command::CS_SOCIAL_REQ_INGAME_FRIEND_SM(User * pUser, ::Network::Packet * pPacket)
{
	PREPARE_PACKET;

	AllowFriendSyn msg;
	*pPacket >> msg.seq;
	if( msg.seq <= 0 )
	{
		::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();
		pAck->MsgCat("%2d%d", ACK_UNKNOWN_ERROR, 0);

		pAck->MakePacket(CMD_SC_SOCIAL_REQ_INGAME_FRIEND_SM);
		pUser->Send(pAck);
		return;
	}

	msg.userseq = pUser->GetUserSeq();
	msg.msgid = GameFriendSyn::MSG_ID;

	::ProjectZ::NProxy::SendFriendsServer(msg.seq, msg);
}

} /*NCommand*/ } /*ProjectZ*/

